package com.youkeyi.ddy.cloud.common.api.application.business.crm.customer;

import com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.dto.BusinessCustomerFollowListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.param.BusinessCustomerFollowCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.param.BusinessCustomerFollowDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.param.BusinessCustomerFollowListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.param.BusinessCustomerFollowUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统客户跟进
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】Customer follow management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessCustomerFollowCloudServiceFallback.class)
@RequestMapping("/business/customer/follow")
public interface BusinessCustomerFollowCloudService {

    // 查询客户跟进列表
    @ApiOperation(value = "Query Business CustomerFollow List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.BusinessCustomerFollowCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessCustomerFollowListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Business CustomerFollow List", dataType = "BusinessCustomerFollowListCloudParam", dataTypeClass = BusinessCustomerFollowListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessCustomerFollowListCloudDto list(BusinessCustomerFollowListCloudParam param);

    // 创建客户跟进
    @ApiOperation(value = "Create Business CustomerFollow", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.BusinessCustomerFollowCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Business CustomerFollow", dataType = "BusinessCustomerFollowCreateCloudParam", dataTypeClass = BusinessCustomerFollowCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessCustomerFollowCreateCloudParam param);


    // 编辑客户跟进
    @ApiOperation(value = "Update Business CustomerFollow", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.BusinessCustomerFollowCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Business CustomerFollow", dataType = "BusinessCustomerFollowUpdateCloudParam", dataTypeClass = BusinessCustomerFollowUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessCustomerFollowUpdateCloudParam param);


    // 删除客户跟进
    @ApiOperation(value = "Delete Business CustomerFollow", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.customer.BusinessCustomerFollowCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Business CustomerFollow", dataType = "BusinessCustomerFollowDeleteCloudParam", dataTypeClass = BusinessCustomerFollowDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessCustomerFollowDeleteCloudParam param);

}
